<template>
  <div class="c-h">
    <SvgIcon v-if="icon!= null" :name="icon" class="icon-tag"/>
    <span>{{ title }}</span>
  </div>
</template>

<script lang="ts">
import {defineComponent} from 'vue';

import EmptyBox2 from "/@/assets/empty-box2.svg";

/**
 * 卡片 头部统一格式样式
 */
export default defineComponent({
  name: 'CardHeader',
  props: {
    icon: {
      type: String,
      default: () => {
        return null
      }
    },
    title: {
      type: String,
      default: () => {
        return '标题'
      }
    }
  },
  setup() {
    return {
      EmptyBox2,
    };
  },
});
</script>

<style scoped lang="scss">
.c-h {
  width: 100%;
  font-size: 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  margin-bottom: 10px;

  .icon-tag {
    font-size: 16px !important;
    margin-right: 6px;
  }
}
</style>
